.class public Lcom/zuimeia/ui/view/ViewPagerTabIndicator;
.super Landroid/widget/RelativeLayout;
.source "ViewPagerTabIndicator.java"

# interfaces
.implements Landroid/support/v4/view/ViewPager$OnPageChangeListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/zuimeia/ui/view/ViewPagerTabIndicator$OnTabSelectedStateChangedListener;,
        Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;
    }
.end annotation


# instance fields
.field private from:I

.field private hasDetermineDirection:Z

.field private isRight:Z

.field private mBottomLine:Landroid/widget/LinearLayout;

.field private mLastSelectedIndex:I

.field private mScrollState:I

.field private mSelectedScale:F

.field private mTabs:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;",
            ">;"
        }
    .end annotation
.end field

.field private mTabsContainer:Landroid/widget/LinearLayout;

.field private mViewPager:Landroid/support/v4/view/ViewPager;

.field private to:I


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 3
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    .line 37
    invoke-direct {p0, p1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    .line 26
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabs:Ljava/util/ArrayList;

    .line 31
    const/4 v0, -0x1

    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mLastSelectedIndex:I

    .line 32
    const v0, 0x3f8ccccd

    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mSelectedScale:F

    .line 38
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->init(Landroid/util/AttributeSet;)V

    .line 39
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .registers 4
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attrs"    # Landroid/util/AttributeSet;

    .prologue
    .line 42
    invoke-direct {p0, p1, p2}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 26
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabs:Ljava/util/ArrayList;

    .line 31
    const/4 v0, -0x1

    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mLastSelectedIndex:I

    .line 32
    const v0, 0x3f8ccccd

    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mSelectedScale:F

    .line 43
    invoke-direct {p0, p2}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->init(Landroid/util/AttributeSet;)V

    .line 44
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .registers 5
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attrs"    # Landroid/util/AttributeSet;
    .param p3, "defStyleAttr"    # I

    .prologue
    .line 47
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 26
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabs:Ljava/util/ArrayList;

    .line 31
    const/4 v0, -0x1

    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mLastSelectedIndex:I

    .line 32
    const v0, 0x3f8ccccd

    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mSelectedScale:F

    .line 48
    invoke-direct {p0, p2}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->init(Landroid/util/AttributeSet;)V

    .line 49
    return-void
.end method

.method static synthetic access$000(Lcom/zuimeia/ui/view/ViewPagerTabIndicator;)Landroid/support/v4/view/ViewPager;
    .registers 2
    .param p0, "x0"    # Lcom/zuimeia/ui/view/ViewPagerTabIndicator;

    .prologue
    .line 24
    iget-object v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mViewPager:Landroid/support/v4/view/ViewPager;

    return-object v0
.end method

.method private adjustLineToTextWidth(I)V
    .registers 3
    .param p1, "width"    # I

    .prologue
    .line 144
    iget-object v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mBottomLine:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    iput p1, v0, Landroid/view/ViewGroup$LayoutParams;->width:I

    .line 145
    return-void
.end method

.method private animChangeBottomLineWidth(I)V
    .registers 4
    .param p1, "to"    # I

    .prologue
    .line 258
    iget-object v1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mBottomLine:Landroid/widget/LinearLayout;

    invoke-virtual {v1}, Landroid/widget/LinearLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    .line 259
    .local v0, "params":Landroid/view/ViewGroup$LayoutParams;
    iput p1, v0, Landroid/view/ViewGroup$LayoutParams;->width:I

    .line 260
    iget-object v1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mBottomLine:Landroid/widget/LinearLayout;

    invoke-virtual {v1, v0}, Landroid/widget/LinearLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 261
    return-void
.end method

.method private animScale(Landroid/view/View;Z)V
    .registers 12
    .param p1, "view"    # Landroid/view/View;
    .param p2, "selected"    # Z

    .prologue
    const/high16 v3, 0x3f800000

    const/4 v8, 0x1

    const/4 v7, 0x0

    .line 219
    if-eqz p2, :cond_4a

    .line 220
    sget-object v4, Landroid/view/View;->SCALE_X:Landroid/util/Property;

    new-array v5, v8, [F

    iget v6, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mSelectedScale:F

    aput v6, v5, v7

    invoke-static {v4, v5}, Landroid/animation/PropertyValuesHolder;->ofFloat(Landroid/util/Property;[F)Landroid/animation/PropertyValuesHolder;

    move-result-object v1

    .line 221
    .local v1, "pVHScalseX":Landroid/animation/PropertyValuesHolder;
    sget-object v4, Landroid/view/View;->SCALE_Y:Landroid/util/Property;

    new-array v5, v8, [F

    iget v6, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mSelectedScale:F

    aput v6, v5, v7

    invoke-static {v4, v5}, Landroid/animation/PropertyValuesHolder;->ofFloat(Landroid/util/Property;[F)Landroid/animation/PropertyValuesHolder;

    move-result-object v2

    .line 230
    .local v2, "pVHScalseY":Landroid/animation/PropertyValuesHolder;
    :goto_1e
    const/4 v4, 0x2

    new-array v4, v4, [Landroid/animation/PropertyValuesHolder;

    aput-object v1, v4, v7

    aput-object v2, v4, v8

    invoke-static {p1, v4}, Landroid/animation/ObjectAnimator;->ofPropertyValuesHolder(Ljava/lang/Object;[Landroid/animation/PropertyValuesHolder;)Landroid/animation/ObjectAnimator;

    move-result-object v0

    .line 231
    .local v0, "animator":Landroid/animation/ObjectAnimator;
    const-wide/16 v4, 0x12c

    invoke-virtual {v0, v4, v5}, Landroid/animation/ObjectAnimator;->setDuration(J)Landroid/animation/ObjectAnimator;

    .line 232
    new-instance v4, Landroid/view/animation/OvershootInterpolator;

    const v5, 0x3f99999a

    invoke-direct {v4, v5}, Landroid/view/animation/OvershootInterpolator;-><init>(F)V

    invoke-virtual {v0, v4}, Landroid/animation/ObjectAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V

    .line 233
    new-instance v4, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$2;

    invoke-direct {v4, p0, p1, p2}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$2;-><init>(Lcom/zuimeia/ui/view/ViewPagerTabIndicator;Landroid/view/View;Z)V

    invoke-virtual {v0, v4}, Landroid/animation/ObjectAnimator;->addListener(Landroid/animation/Animator$AnimatorListener;)V

    .line 240
    invoke-virtual {v0}, Landroid/animation/ObjectAnimator;->start()V

    .line 241
    if-eqz p2, :cond_5f

    :goto_46
    invoke-virtual {p1, v3}, Landroid/view/View;->setAlpha(F)V

    .line 242
    return-void

    .line 224
    .end local v0    # "animator":Landroid/animation/ObjectAnimator;
    .end local v1    # "pVHScalseX":Landroid/animation/PropertyValuesHolder;
    .end local v2    # "pVHScalseY":Landroid/animation/PropertyValuesHolder;
    :cond_4a
    sget-object v4, Landroid/view/View;->SCALE_X:Landroid/util/Property;

    new-array v5, v8, [F

    aput v3, v5, v7

    invoke-static {v4, v5}, Landroid/animation/PropertyValuesHolder;->ofFloat(Landroid/util/Property;[F)Landroid/animation/PropertyValuesHolder;

    move-result-object v1

    .line 225
    .restart local v1    # "pVHScalseX":Landroid/animation/PropertyValuesHolder;
    sget-object v4, Landroid/view/View;->SCALE_Y:Landroid/util/Property;

    new-array v5, v8, [F

    aput v3, v5, v7

    invoke-static {v4, v5}, Landroid/animation/PropertyValuesHolder;->ofFloat(Landroid/util/Property;[F)Landroid/animation/PropertyValuesHolder;

    move-result-object v2

    .restart local v2    # "pVHScalseY":Landroid/animation/PropertyValuesHolder;
    goto :goto_1e

    .line 241
    .restart local v0    # "animator":Landroid/animation/ObjectAnimator;
    :cond_5f
    const v3, 0x3f19999a

    goto :goto_46
.end method

.method private init(Landroid/util/AttributeSet;)V
    .registers 9
    .param p1, "attrs"    # Landroid/util/AttributeSet;

    .prologue
    const/4 v6, -0x1

    .line 52
    new-instance v3, Landroid/widget/LinearLayout;

    invoke-virtual {p0}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->getContext()Landroid/content/Context;

    move-result-object v4

    invoke-direct {v3, v4, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    iput-object v3, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabsContainer:Landroid/widget/LinearLayout;

    .line 53
    iget-object v3, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabsContainer:Landroid/widget/LinearLayout;

    const/4 v4, 0x0

    invoke-virtual {v3, v4}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 54
    iget-object v3, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabsContainer:Landroid/widget/LinearLayout;

    const/16 v4, 0x11

    invoke-virtual {v3, v4}, Landroid/widget/LinearLayout;->setGravity(I)V

    .line 56
    new-instance v3, Landroid/widget/LinearLayout;

    invoke-virtual {p0}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->getContext()Landroid/content/Context;

    move-result-object v4

    invoke-direct {v3, v4}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    iput-object v3, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mBottomLine:Landroid/widget/LinearLayout;

    .line 58
    new-instance v1, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v1, v6, v6}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    .line 59
    .local v1, "containerParams":Landroid/widget/RelativeLayout$LayoutParams;
    iget-object v3, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabsContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v3, v1}, Landroid/widget/LinearLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 60
    iget-object v3, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabsContainer:Landroid/widget/LinearLayout;

    invoke-virtual {p0, v3}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->addView(Landroid/view/View;)V

    .line 62
    const/4 v3, 0x1

    const/high16 v4, 0x40000000

    invoke-virtual {p0}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    invoke-virtual {v5}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v5

    invoke-static {v3, v4, v5}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result v3

    float-to-int v2, v3

    .line 63
    .local v2, "dp_1":I
    new-instance v0, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v0, v6, v2}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    .line 64
    .local v0, "bottomLineParams":Landroid/widget/RelativeLayout$LayoutParams;
    const/16 v3, 0xc

    invoke-virtual {v0, v3}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    .line 65
    iget-object v3, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mBottomLine:Landroid/widget/LinearLayout;

    invoke-virtual {v3, v0}, Landroid/widget/LinearLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 66
    iget-object v3, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mBottomLine:Landroid/widget/LinearLayout;

    invoke-virtual {p0, v3}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->addView(Landroid/view/View;)V

    .line 68
    iget-object v3, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mBottomLine:Landroid/widget/LinearLayout;

    invoke-virtual {v3, v6}, Landroid/widget/LinearLayout;->setBackgroundColor(I)V

    .line 69
    return-void
.end method

.method private isValidateIndex(I)Z
    .registers 3
    .param p1, "index"    # I

    .prologue
    .line 212
    if-ltz p1, :cond_c

    iget-object v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabs:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-ge p1, v0, :cond_c

    const/4 v0, 0x1

    :goto_b
    return v0

    :cond_c
    const/4 v0, 0x0

    goto :goto_b
.end method


# virtual methods
.method public onPageScrollStateChanged(I)V
    .registers 3
    .param p1, "state"    # I

    .prologue
    .line 345
    iput p1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mScrollState:I

    .line 346
    if-nez p1, :cond_7

    .line 347
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->hasDetermineDirection:Z

    .line 349
    :cond_7
    return-void
.end method

.method public onPageScrolled(IFI)V
    .registers 9
    .param p1, "position"    # I
    .param p2, "positionOffset"    # F
    .param p3, "positionOffsetPixels"    # I

    .prologue
    const/4 v1, 0x0

    const/4 v2, 0x1

    .line 270
    iget-object v3, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mViewPager:Landroid/support/v4/view/ViewPager;

    if-nez v3, :cond_7

    .line 335
    :goto_6
    return-void

    .line 274
    :cond_7
    iget-object v3, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mViewPager:Landroid/support/v4/view/ViewPager;

    invoke-virtual {v3}, Landroid/support/v4/view/ViewPager;->getCurrentItem()I

    move-result v0

    .line 276
    .local v0, "curPos":I
    iget v3, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mScrollState:I

    if-ne v3, v2, :cond_3f

    .line 277
    if-gt v0, p1, :cond_14

    move v1, v2

    :cond_14
    iput-boolean v1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->isRight:Z

    .line 278
    iget-boolean v1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->isRight:Z

    if-eqz v1, :cond_3a

    .line 279
    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->from:I

    .line 280
    add-int/lit8 v1, v0, 0x1

    iput v1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->to:I

    .line 281
    iget v1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->to:I

    iget-object v3, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mViewPager:Landroid/support/v4/view/ViewPager;

    invoke-virtual {v3}, Landroid/support/v4/view/ViewPager;->getAdapter()Landroid/support/v4/view/PagerAdapter;

    move-result-object v3

    invoke-virtual {v3}, Landroid/support/v4/view/PagerAdapter;->getCount()I

    move-result v3

    if-lt v1, v3, :cond_30

    .line 282
    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->to:I

    .line 288
    :cond_30
    :goto_30
    iput-boolean v2, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->hasDetermineDirection:Z

    .line 334
    :cond_32
    :goto_32
    iget v1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->from:I

    iget v2, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->to:I

    invoke-virtual {p0, v1, v2, p2}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->scrollTo(IIF)V

    goto :goto_6

    .line 285
    :cond_3a
    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->from:I

    .line 286
    iput p1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->to:I

    goto :goto_30

    .line 289
    :cond_3f
    iget v3, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mScrollState:I

    const/4 v4, 0x2

    if-ne v3, v4, :cond_32

    .line 290
    iget-boolean v3, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->hasDetermineDirection:Z

    if-nez v3, :cond_57

    .line 291
    if-le v0, p1, :cond_4b

    move v1, v2

    :cond_4b
    iput-boolean v1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->isRight:Z

    .line 292
    iget-boolean v1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->isRight:Z

    if-eqz v1, :cond_83

    .line 293
    iput p1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->from:I

    .line 294
    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->to:I

    .line 299
    :goto_55
    iput-boolean v2, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->hasDetermineDirection:Z

    .line 302
    :cond_57
    iget-boolean v1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->isRight:Z

    if-nez v1, :cond_61

    if-eq v0, p1, :cond_61

    .line 303
    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->from:I

    .line 304
    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->to:I

    .line 307
    :cond_61
    iget-boolean v1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->isRight:Z

    if-nez v1, :cond_6e

    const/4 v1, 0x0

    cmpg-float v1, p2, v1

    if-gtz v1, :cond_6e

    .line 308
    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->from:I

    .line 309
    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->to:I

    .line 312
    :cond_6e
    iget-boolean v1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->isRight:Z

    if-eqz v1, :cond_78

    if-ne v0, p1, :cond_78

    .line 313
    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->from:I

    .line 314
    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->to:I

    .line 317
    :cond_78
    if-ne v0, p1, :cond_32

    iget v1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->to:I

    if-ge v1, v0, :cond_32

    .line 318
    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->from:I

    .line 319
    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->to:I

    goto :goto_32

    .line 296
    :cond_83
    add-int/lit8 v1, v0, 0x1

    iput v1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->from:I

    .line 297
    iput v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->to:I

    goto :goto_55
.end method

.method public onPageSelected(I)V
    .registers 2
    .param p1, "position"    # I

    .prologue
    .line 339
    invoke-virtual {p0, p1}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->setSelectedPosition(I)V

    .line 340
    return-void
.end method

.method public scrollTo(IIF)V
    .registers 20
    .param p1, "curPosition"    # I
    .param p2, "destinationPosition"    # I
    .param p3, "percent"    # F

    .prologue
    .line 157
    move-object/from16 v0, p0

    iget-object v13, v0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabs:Ljava/util/ArrayList;

    move/from16 v0, p1

    invoke-virtual {v13, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v13

    check-cast v13, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;

    iget-object v3, v13, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;->tabView:Landroid/view/View;

    .line 158
    .local v3, "curView":Landroid/view/View;
    move-object/from16 v0, p0

    iget-object v13, v0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabs:Ljava/util/ArrayList;

    move/from16 v0, p2

    invoke-virtual {v13, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v13

    check-cast v13, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;

    iget-object v6, v13, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;->tabView:Landroid/view/View;

    .line 162
    .local v6, "destinationView":Landroid/view/View;
    invoke-virtual {v6}, Landroid/view/View;->getWidth()I

    move-result v13

    int-to-float v13, v13

    move-object/from16 v0, p0

    iget v14, v0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mSelectedScale:F

    const/high16 v15, 0x3f800000

    sub-float/2addr v14, v15

    mul-float/2addr v13, v14

    const/high16 v14, 0x40000000

    div-float v9, v13, v14

    .line 164
    .local v9, "scaleAdjust":F
    move/from16 v0, p1

    move/from16 v1, p2

    if-le v0, v1, :cond_c1

    .line 165
    const/high16 v13, 0x3f800000

    sub-float v11, v13, p3

    .line 166
    .local v11, "transPercent":F
    invoke-virtual {v3}, Landroid/view/View;->getLeft()I

    move-result v13

    invoke-virtual {v6}, Landroid/view/View;->getLeft()I

    move-result v14

    sub-int/2addr v13, v14

    int-to-float v13, v13

    mul-float v13, v13, p3

    invoke-virtual {v6}, Landroid/view/View;->getLeft()I

    move-result v14

    int-to-float v14, v14

    add-float/2addr v13, v14

    sub-float/2addr v13, v9

    float-to-int v12, v13

    .line 173
    .local v12, "translationTo":I
    :goto_4b
    move-object/from16 v0, p0

    iget-object v13, v0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mBottomLine:Landroid/widget/LinearLayout;

    int-to-float v14, v12

    invoke-virtual {v13, v14}, Landroid/widget/LinearLayout;->setTranslationX(F)V

    .line 175
    move/from16 v0, p1

    move/from16 v1, p2

    if-eq v0, v1, :cond_c0

    .line 176
    move-object/from16 v0, p0

    iget v13, v0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mSelectedScale:F

    const/high16 v14, 0x3f800000

    sub-float/2addr v13, v14

    const/high16 v14, 0x3f800000

    sub-float/2addr v14, v11

    mul-float/2addr v13, v14

    const/high16 v14, 0x3f800000

    add-float v2, v13, v14

    .line 177
    .local v2, "curScale":F
    invoke-virtual {v3, v2}, Landroid/view/View;->setScaleX(F)V

    .line 178
    invoke-virtual {v3, v2}, Landroid/view/View;->setScaleY(F)V

    .line 180
    move-object/from16 v0, p0

    iget v13, v0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mSelectedScale:F

    const/high16 v14, 0x3f800000

    sub-float/2addr v13, v14

    mul-float/2addr v13, v11

    const/high16 v14, 0x3f800000

    add-float v5, v13, v14

    .line 181
    .local v5, "destScale":F
    invoke-virtual {v6, v5}, Landroid/view/View;->setScaleX(F)V

    .line 182
    invoke-virtual {v6, v5}, Landroid/view/View;->setScaleY(F)V

    .line 184
    move-object/from16 v0, p0

    iget-object v13, v0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabs:Ljava/util/ArrayList;

    move/from16 v0, p1

    invoke-virtual {v13, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v13

    check-cast v13, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;

    iget v13, v13, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;->viewWidth:I

    int-to-float v13, v13

    move-object/from16 v0, p0

    iget v14, v0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mSelectedScale:F

    mul-float/2addr v13, v14

    float-to-int v8, v13

    .line 185
    .local v8, "fromWidth":I
    move-object/from16 v0, p0

    iget-object v13, v0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabs:Ljava/util/ArrayList;

    move/from16 v0, p2

    invoke-virtual {v13, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v13

    check-cast v13, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;

    iget v13, v13, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;->viewWidth:I

    int-to-float v13, v13

    move-object/from16 v0, p0

    iget v14, v0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mSelectedScale:F

    mul-float/2addr v13, v14

    float-to-int v10, v13

    .line 187
    .local v10, "toWidth":I
    move-object/from16 v0, p0

    iget-object v13, v0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mBottomLine:Landroid/widget/LinearLayout;

    invoke-virtual {v13}, Landroid/widget/LinearLayout;->getWidth()I

    move-result v13

    if-eq v13, v10, :cond_c0

    .line 188
    sub-int v7, v10, v8

    .line 189
    .local v7, "dx":I
    int-to-float v13, v7

    mul-float/2addr v13, v11

    float-to-int v13, v13

    add-int v4, v8, v13

    .line 190
    .local v4, "curWidth":I
    move-object/from16 v0, p0

    invoke-direct {v0, v4}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->animChangeBottomLineWidth(I)V

    .line 194
    .end local v2    # "curScale":F
    .end local v4    # "curWidth":I
    .end local v5    # "destScale":F
    .end local v7    # "dx":I
    .end local v8    # "fromWidth":I
    .end local v10    # "toWidth":I
    :cond_c0
    return-void

    .line 168
    .end local v11    # "transPercent":F
    .end local v12    # "translationTo":I
    :cond_c1
    move/from16 v11, p3

    .line 169
    .restart local v11    # "transPercent":F
    invoke-virtual {v6}, Landroid/view/View;->getLeft()I

    move-result v13

    invoke-virtual {v3}, Landroid/view/View;->getLeft()I

    move-result v14

    sub-int/2addr v13, v14

    int-to-float v13, v13

    mul-float v13, v13, p3

    invoke-virtual {v3}, Landroid/view/View;->getLeft()I

    move-result v14

    int-to-float v14, v14

    add-float/2addr v13, v14

    sub-float/2addr v13, v9

    float-to-int v12, v13

    .restart local v12    # "translationTo":I
    goto/16 :goto_4b
.end method

.method public setGravity(I)V
    .registers 3
    .param p1, "gravity"    # I

    .prologue
    .line 72
    iget-object v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabsContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v0, p1}, Landroid/widget/LinearLayout;->setGravity(I)V

    .line 73
    return-void
.end method

.method public setLineColor(I)V
    .registers 3
    .param p1, "color"    # I

    .prologue
    .line 80
    iget-object v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mBottomLine:Landroid/widget/LinearLayout;

    invoke-virtual {v0, p1}, Landroid/widget/LinearLayout;->setBackgroundColor(I)V

    .line 81
    return-void
.end method

.method public setLineHeight(I)V
    .registers 3
    .param p1, "height"    # I

    .prologue
    .line 76
    iget-object v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mBottomLine:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    iput p1, v0, Landroid/view/ViewGroup$LayoutParams;->height:I

    .line 77
    return-void
.end method

.method public setSelectedPosition(I)V
    .registers 4
    .param p1, "index"    # I

    .prologue
    .line 197
    iget v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mLastSelectedIndex:I

    if-eq p1, v0, :cond_32

    .line 198
    invoke-direct {p0, p1}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->isValidateIndex(I)Z

    move-result v0

    if-eqz v0, :cond_32

    .line 200
    iget-object v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabs:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;

    iget-object v0, v0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;->tabView:Landroid/view/View;

    const/4 v1, 0x1

    invoke-direct {p0, v0, v1}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->animScale(Landroid/view/View;Z)V

    .line 201
    iget v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mLastSelectedIndex:I

    invoke-direct {p0, v0}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->isValidateIndex(I)Z

    move-result v0

    if-eqz v0, :cond_30

    .line 202
    iget-object v0, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabs:Ljava/util/ArrayList;

    iget v1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mLastSelectedIndex:I

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;

    iget-object v0, v0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;->tabView:Landroid/view/View;

    const/4 v1, 0x0

    invoke-direct {p0, v0, v1}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->animScale(Landroid/view/View;Z)V

    .line 205
    :cond_30
    iput p1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mLastSelectedIndex:I

    .line 209
    :cond_32
    return-void
.end method

.method public setTabs(Ljava/util/ArrayList;)V
    .registers 16
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;",
            ">;)V"
        }
    .end annotation

    .prologue
    .local p1, "tabs":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;>;"
    const/4 v13, -0x2

    const/4 v12, 0x0

    .line 88
    iput-object p1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabs:Ljava/util/ArrayList;

    .line 90
    iget-object v9, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabsContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v9}, Landroid/widget/LinearLayout;->removeAllViews()V

    .line 91
    const/4 v0, 0x0

    .line 92
    .local v0, "maxTextWidth":I
    const/4 v5, 0x0

    .line 93
    .local v5, "totalTextWidth":I
    iget-object v9, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabs:Ljava/util/ArrayList;

    invoke-virtual {v9}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v9

    :goto_11
    invoke-interface {v9}, Ljava/util/Iterator;->hasNext()Z

    move-result v10

    if-eqz v10, :cond_44

    invoke-interface {v9}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;

    .line 94
    .local v3, "tab":Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;
    new-instance v2, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v2, v13, v13}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    .line 96
    .local v2, "params":Landroid/widget/LinearLayout$LayoutParams;
    iget-object v10, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabsContainer:Landroid/widget/LinearLayout;

    iget-object v11, v3, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;->tabView:Landroid/view/View;

    invoke-virtual {v10, v11, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 97
    iget-object v10, v3, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;->tabView:Landroid/view/View;

    invoke-virtual {v10, v12, v12}, Landroid/view/View;->measure(II)V

    .line 98
    iget-object v10, v3, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;->tabView:Landroid/view/View;

    invoke-virtual {v10}, Landroid/view/View;->getMeasuredWidth()I

    move-result v1

    .line 99
    .local v1, "measuredWidth":I
    iput v1, v3, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;->viewWidth:I

    .line 100
    add-int/2addr v5, v1

    .line 101
    invoke-static {v1, v0}, Ljava/lang/Math;->max(II)I

    move-result v0

    .line 103
    iget-object v10, v3, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;->tabView:Landroid/view/View;

    const v11, 0x3f19999a

    invoke-virtual {v10, v11}, Landroid/view/View;->setAlpha(F)V

    goto :goto_11

    .line 106
    .end local v1    # "measuredWidth":I
    .end local v2    # "params":Landroid/widget/LinearLayout$LayoutParams;
    .end local v3    # "tab":Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;
    :cond_44
    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result v9

    if-lez v9, :cond_65

    .line 107
    iput v12, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mLastSelectedIndex:I

    .line 108
    iget-object v9, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabs:Ljava/util/ArrayList;

    invoke-virtual {v9, v12}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;

    iget-object v6, v9, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;->tabView:Landroid/view/View;

    .line 109
    .local v6, "view":Landroid/view/View;
    const/high16 v9, 0x3f800000

    invoke-virtual {v6, v9}, Landroid/view/View;->setAlpha(F)V

    .line 110
    iget v9, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mSelectedScale:F

    invoke-virtual {v6, v9}, Landroid/view/View;->setScaleX(F)V

    .line 111
    iget v9, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mSelectedScale:F

    invoke-virtual {v6, v9}, Landroid/view/View;->setScaleY(F)V

    .line 114
    .end local v6    # "view":Landroid/view/View;
    :cond_65
    if-lez v0, :cond_ad

    .line 116
    invoke-virtual {p0}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->getResources()Landroid/content/res/Resources;

    move-result-object v9

    invoke-virtual {v9}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v9

    iget v9, v9, Landroid/util/DisplayMetrics;->widthPixels:I

    invoke-virtual {p0}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->getPaddingLeft()I

    move-result v10

    sub-int/2addr v9, v10

    invoke-virtual {p0}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->getPaddingRight()I

    move-result v10

    sub-int v8, v9, v10

    .line 118
    .local v8, "width":I
    sub-int v4, v8, v5

    .line 119
    .local v4, "totalMargins":I
    if-lez v4, :cond_a5

    .line 120
    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result v9

    add-int/lit8 v9, v9, 0x1

    div-int v7, v4, v9

    .line 121
    .local v7, "viewMargin":I
    iget-object v9, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mTabs:Ljava/util/ArrayList;

    invoke-virtual {v9}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v9

    :goto_8e
    invoke-interface {v9}, Ljava/util/Iterator;->hasNext()Z

    move-result v10

    if-eqz v10, :cond_a5

    invoke-interface {v9}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;

    .line 122
    .restart local v3    # "tab":Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;
    iget-object v10, v3, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;->tabView:Landroid/view/View;

    invoke-virtual {v10}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v2

    check-cast v2, Landroid/widget/LinearLayout$LayoutParams;

    .line 123
    .restart local v2    # "params":Landroid/widget/LinearLayout$LayoutParams;
    iput v7, v2, Landroid/widget/LinearLayout$LayoutParams;->leftMargin:I

    goto :goto_8e

    .line 127
    .end local v2    # "params":Landroid/widget/LinearLayout$LayoutParams;
    .end local v3    # "tab":Lcom/zuimeia/ui/view/ViewPagerTabIndicator$ViewPagerTab;
    .end local v7    # "viewMargin":I
    :cond_a5
    int-to-float v9, v0

    iget v10, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mSelectedScale:F

    mul-float/2addr v9, v10

    float-to-int v9, v9

    invoke-direct {p0, v9}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->adjustLineToTextWidth(I)V

    .line 130
    .end local v4    # "totalMargins":I
    .end local v8    # "width":I
    :cond_ad
    new-instance v9, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$1;

    invoke-direct {v9, p0}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator$1;-><init>(Lcom/zuimeia/ui/view/ViewPagerTabIndicator;)V

    invoke-virtual {p0, v9}, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->post(Ljava/lang/Runnable;)Z

    .line 141
    return-void
.end method

.method public setViewPager(Landroid/support/v4/view/ViewPager;)V
    .registers 2
    .param p1, "viewPager"    # Landroid/support/v4/view/ViewPager;

    .prologue
    .line 84
    iput-object p1, p0, Lcom/zuimeia/ui/view/ViewPagerTabIndicator;->mViewPager:Landroid/support/v4/view/ViewPager;

    .line 85
    return-void
.end method
